package com.earnings.okhttputils.utils.ui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import com.earnings.R;
import com.earnings.okhttputils.utils.bean.EarningsData;

/**
 * 动力值说明
 * Created by Administrator on 2017/5/8 0008.
 */

public class PowerDialog extends Dialog implements View.OnClickListener {
    private TextView my_dongli,allpower;

    public PowerDialog(@NonNull Context context) {
        super(context);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.dialog_power);
        getWindow().setBackgroundDrawableResource(R.drawable.power_bg);
        findViewById(R.id.ok_view).setOnClickListener(this);
        my_dongli= (TextView) findViewById(R.id.my_dongli);
        allpower= (TextView) findViewById(R.id.allpower);
    }

    public void setValue(EarningsData earningsData){
        my_dongli.setText(earningsData.getBasics());
        allpower.setText(earningsData.getAllpower());
    }

    @Override
    public void onClick(View v) {
        dismiss();
    }
}
